//
//  RecordViewController.swift
//  TQMedia
//
//  Created by XieLB on 2018/9/28.
//  Copyright © 2018年 XieLB. All rights reserved.
//

import UIKit

class RecordViewController: UIViewController {

    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        
        CTMediator.sharedInstance()?.tq_stopRecord(filePath: "868120200860192-0@25-20180821171412.amr")
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        
        CTMediator.sharedInstance()?.tq_getPlayRecordCloser(closer: {
            print("tq_getPlayRecordCloser")
        })
        
        CTMediator.sharedInstance()?.tq_getStopRecordCloser(closer: {
            print("tq_getStopRecordCloser")
        })
        
        CTMediator.sharedInstance()?.tq_downloadStateChangeCloser(closer: { (state) in
            print("downloadState  =  \(state)")
        })
        
        CTMediator.sharedInstance()?.tq_playRecord(fname: "868120200860192-0@25-20180821171412.amr", downloadUrl: "http://statics.aichezaixian.com/868120200860192-0@25-20180821171412.amr")
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
